<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>      
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title></title>
<style>
    table,table tr th, table tr td { border:1px solid #0094ff; }
</style>
</head>
<body style="text-align:center;">
 <h1>新闻列表</h1>
    <table align="center" style="text-align: left; width: 510px; height: 88px;" border="0" cellpadding="2" cellspacing="2">
        <thead>
            <tr>
            <th>
				新闻标题
			</th>            <th>
作者
			</th>
			 <th>
添加时间
			</th>
			<th>
查看详情
			</th>


</tr>
        </thead>
        <tbody>
        
            <c:forEach items="${newsList }" var="ctxt">
            <tr>
                <td>
                    ${ctxt.title } </td>
                   <td> ${ctxt.author } </td>
                   <td> ${ctxt.addtime } </td>
					<td><a href="<%=path %>/toShowNews.action?id=${ctxt.id }">查看详情</a></td>
            
          
            </tr>        
            </c:forEach>    
        </tbody>        
    </table>

</body>
</html>